﻿// HSS.Data.IDataEntityDelete.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       IDataEntityDelete.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Data
{
	#region Using Directives
	using System.Data.SqlClient;

	#endregion

	#region IDataEntityDelete
	/// <summary>
	/// IDataContentDelete marks a class as supporting the Delete feature of <see cref="DataAccessService{TDataEntity}"/> services.
	/// </summary>
	public interface IDataEntityDelete
	{
		/// <summary>
		/// Delete this item from the database
		/// </summary>
		/// <param name="da">The current DataAccess instance</param>
		/// <returns>An int containing the return value of the database call.</returns>
		int Delete(DataAccess da);
	}
	#endregion

	#region IDataEntityDeleteTrx
	/// <summary>
	/// IDataEntityDeleteTrx marks a class as supporting the DeleteTrx feature of <see cref="DataAccessService{TDataEntity}"/> services.
	/// </summary>
	public interface IDataEntityDeleteTrx
	{
		/// <summary>
		/// Delete this item from the database
		/// </summary>
		/// <param name="cmd">The current SqlCommand instance</param>
		/// <returns>An int containing the return value of the database call.</returns>
		int Delete(SqlCommand cmd);
	}
	#endregion

	#region IDataEntityBatchDelete
	/// <summary>
	/// IDataEntityBatchDelete marks a class as supporting the DeleteBatch feature of <see cref="DataAccessService{TDataEntity}"/> services.
	/// </summary>
	public interface IDataEntityBatchDelete
	{
		/// <summary>
		/// Delete this batch item from the database
		/// </summary>
		/// <param name="da">The current DataAccess instance</param>
		/// <returns>true if the item was successfully deleted; otherwise false.</returns>
		bool DeleteBatchItem(DataAccess da);
	}
	#endregion

	#region IDataEntityBatchDeleteTrx
	/// <summary>
	/// IDataEntityBatchDeleteTrx marks a class as supporting the DeleteBatchTrx feature of <see cref="DataAccessService{TDataEntity}"/> services.
	/// </summary>
	public interface IDataEntityBatchDeleteTrx
	{
		/// <summary>
		/// Delete this batch item from the database
		/// </summary>
		/// <param name="cmd">The current SqlCommand instance</param>
		/// <returns>true if the item was successfully deleted; otherwise false.</returns>
		bool DeleteBatchItem(SqlCommand cmd);
	}
	#endregion
}